<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="vtc" uri="/ls-trade-tags"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html>
<head>
	<title>3rd Level Planning - Endorsement</title>
</head>
<body>

<div class="content">
	<script>
		
		function clickBut(action) {
			switch (action) {
			case "endorse":
				$("#level3PlanningForm").attr("action", "endorsement!endorseLevel3.action");
				break;
			case "cancel":
				$("#level3PlanningForm").attr("action", "endorsement!search.action");
				break;
			case "viewDetail":
				$("#level3PlanningForm").attr("action", "endorsement!toViewLevel3Detail.action?no-decorate");
				break;
			}
			$("#level3PlanningForm").submit();
		}
	</script>

	<div class="pageTitle">3rd Level Planning - Endorsement</div>
	<div class="form2">
		  <s:actionerror/>
	  <s:fielderror id="fielderror" />
	  <s:actionmessage/> 
	  
	<label  id="errorMessage" style="color: red;"></label>
		<form id="level3PlanningForm" name="level3PlanningForm" method="post">
	<s:hidden name="level3Planning.id" id="level3Planning.id" value="%{level3Planning.id}"/>
	<s:hidden name="level3Planning.planning.id" id="level3Planning.planning.id" value="%{level3Planning.planning.id}"/>
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="sep"><img src="../images/spacer.gif"
					style="width: 180px;" />
				</td>
				<td class="sep sep2"><img src="../images/spacer.gif" />
				</td>
			</tr>
			<tr>
				<td><label class="fLabel">Planning Exercise</label>

					<div class="fField">
						<s:hidden name="level3Planning.planningExercise" id="level3Planning.planningExercise" value="%{level3Planning.planningExercise}"/>
									<select class="inputSelect" id="" name="planningExerciseTemp" style="width: 180px;">
										<option value="level3Planning.planningExercise" selected="selected">
										<script>
										var year = "<s:property value='level3Planning.planningExercise'/>";
										if(year!=null && year!='' && year!=0){
											var toYear = year.toString().substring(2);
											document.write(year+"/"+(parseFloat(toYear) + 1));
										}
										</script></option>
									</select>

					</div>
				</td>
				<td></td>
			</tr>
			<tr>
				<td colspan="2"><label class="fLabel">Remarks</label>
					<div class="fField">
					<s:textarea id="remarks" name="level3Planning.remarks" cssClass="inputTextarea" cssStyle="width: 500px; height: 100px;"  readonly="true"></s:textarea>
					</div>
				</td>
			</tr>
			<tr>
				<td><label class="fLabel">Status</label>
					<div class="fField">
					<s:textfield id="status" name="status" value="%{level3Planning.planning.status.label}" cssClass="inputText" cssStyle="width:150px" readonly="true"></s:textfield>
					</div>
				</td>
			</tr>

		</table>
		<div class="btnSet btnSetTypeA">
			<div class="left">
			 <security:authorize access="hasRole('ENDORSE_3RD_LEVEL')">
				<div class="button">
					<div class="left">
						<div class="right">
							<input class="inputButton" type="button" id="" name=""
								value="Endorse" onclick="clickBut('endorse')" />
						</div>
					</div>
				</div>
			</security:authorize>
				<div class="button">
					<div class="left">
						<div class="right">
						<input class="inputButton" type="button" id="" name=""
								value="View Detail" onclick="clickBut('viewDetail')" />
						</div>
					</div>

				</div>

				<div class="button">

					<div class="left">
						<div class="right">
							<input class="inputButton" type="button" id="" name=""
								value="Cancel" onclick="clickBut('cancel')" />
						</div>
					</div>
				</div>
			</div>
		</div>
		</form>
	</div>


	<!-- InstanceEndEditable -->
</div>

</body>
</html>